package com.qf.forumproject.utils;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author manchi520
 * @date 2022/7/25
 * @Time: 20:51
 * @apiNote
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
//使用vo类收取前端传过来的数据信息
public class BlogAndCommentVo {
    //文章id
    private int id;
    private String bid;
    //文章标题
    private String title;
    //文章内容
    private String content;
    //浏览量
    private int views;
    //作者昵称
    private String username;
    //作者头像
    private String avatar;
    //文章分类
    private String categoryName;
    //文章创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date blog_gmt_create;
    //文章修改时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date blog_gmt_update;
    //评论者名称
    private String commentname;
    //评论的内容
    private String comment_content;
    //评论创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date  comment_gmt_create;

}
